﻿import math

class Position():
    """Classe abstrata para cuidar do posicionamento dos objetos."""

    def setX(self, xP):
        '''x.X = XP'''
        self._x = xP
    def getX(self):
        '''==> x.X'''
        return self._x

    def setY(self, yP):
        '''x.y = yP'''
        self._y = yP
    def getY(self):
        '''==> x.y'''
        return self._y

    def setOrientation(self, orientationP):
        '''x.orientation = orientationP'''
        self._orientation = orientationP
    def getOrientation(self):
        '''==> x.orientation'''
        return self._orientation

    def getDistance(self, otherPosition):
        '''==> distance between two points'''
        return sqrt((self.getX() - otherPosition.getX())**2 + (self.getY() - otherPosition.getY())**2)